<?php

function tf_import_settings_now() {

  $thfruploadpath = urldecode($_POST['thfruploadpath']);
  $import_settings_file = $thfruploadpath . '/' . preg_replace('/^(.*)\//i', '', $_POST['importFile']);

  if (file_exists($import_settings_file)) {

    $message = "<span style='color:green;font-weight:bold;'>Successfully imported settings of ... $import_settings_file</span>";
    set_thfr($message, 1, $import_settings_file);
    # echo "<span style='color:green;font-weight:bold;'>Successfully imported settings of ... $import_settings_file</span>";
  } else {
    $message = "<span style='color:red;font-weight:bold;'>Could not find or import $import_settings_file</span>";
    set_thfr($message, FALSE);
  }
  die();
}

?>
